package com.elock;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;

import com.elock.common.LaunchInitialization;

/**
 * Start up
 * 
 * @author 仁德
 */
@SpringBootApplication
@EnableAutoConfiguration(exclude = { MultipartAutoConfiguration.class })
@ImportResource("classpath:applicationContext.xml")
public class Application extends SpringBootServletInitializer {

	public static void main(String[] args) {
		// 程序启动入口
		SpringApplication application = new SpringApplication(Application.class);
		application.addListeners(new LaunchInitialization());
		application.run(args);
	}

	// @Override
	// protected SpringApplicationBuilder configure(
	// SpringApplicationBuilder builder) {
	// //设置启动类，用于独立tomcat运行的入口
	// builder.listeners(new LaunchInitialization());
	// return builder.sources(Application.class);
	// }

}
